import * as ROUTER_NAMES from "../routerNames/index";
const NotFoundPage = () => import("@/views/notFound/index.vue");
const LoginPage = () => import("@/views/login/index/index.vue");
const ChooseBranchPage = () => import("@/views/login/chooseBranch/index.vue");

const Layout = () => import("@/layouts/index.vue");
const TradeInPage = () => import("@/views/tradeIn/index/index.vue");

const TradeInOrdersPage = () =>
  import("@/views/orders/tradeIn/index/index.vue");

const TradeInOrderDetailPage = () =>
  import("@/views/orders/tradeIn/detail/index.vue");

const TradeInReceiptPage = () => import("@/views/receipt/tradeIn/index.vue");

const RoleIndexPage = () => import("@/views/roles/index/index.vue");

const UserIndexPage = () => import("@/views/users/index/index.vue");

const SettingsIndexPage = () => import("@/views/settings/company/index.vue");

const InventoryPage = () => import("@/views/inventory/index/index.vue");

const InventoryDetailPage = () => import("@/views/inventory/detail/index.vue");

const CheckListAddPage = () => import("@/views/checkList/add/index.vue");

const SalesPage = () => import("@/views/sales/index/index.vue");

const SalesOrdersPage = () => import("@/views/orders/sales/index/index.vue");

const SalesOrderDetailPage = () =>
  import("@/views/orders/sales/detail/index.vue");

const PurchasePage = () => import("@/views/purchase/index/index.vue");

const PurchaseOrdersPage = () =>
  import("@/views/orders/purchase/index/index.vue");

const PurchaseOrderDetailPage = () =>
  import("@/views/orders/purchase/detail/index.vue");

const BranchesPage = () => import("@/views/branches/index/index.vue");

const RepairPage = () => import("@/views/repair/index/index.vue");

const RepairOrdersPage = () => import("@/views/orders/repair/index/index.vue");

const RepairOrderDetailPage = () =>
  import("@/views/orders/repair/detail/index.vue");

const CheckListPage = () => import("@/views/checkList/index/index.vue");

const CheckDetailPage = () => import("@/views/checkList/detail/index.vue");

const CategoryPage = () => import("@/views/category/index/index.vue");

const BrandPage = () => import("@/views/brands/index/index.vue");

const ProductAttributePage = () =>
  import("@/views/productAttribute/index/index.vue");

const MenusPage = () => import("@/views/menus/index/index.vue");

const routes = [
  {
    // path: "/",
    name: "Layout",
    component: Layout,
    redirect: ROUTER_NAMES.DASHBOARD_PAGE.URL,
    children: [
      {
        path: ROUTER_NAMES.BRANCHES_PAGE.URL,
        name: ROUTER_NAMES.BRANCHES_PAGE.NAME,
        component: BranchesPage,
        props: ROUTER_NAMES.BRANCHES_PAGE.PROPS,
        meta: ROUTER_NAMES.BRANCHES_PAGE.META,
      },
      {
        path: ROUTER_NAMES.PURHCASE_ORDER_DETAIL_PAGE.URL,
        name: ROUTER_NAMES.PURHCASE_ORDER_DETAIL_PAGE.NAME,
        component: PurchaseOrderDetailPage,
        props: ROUTER_NAMES.PURHCASE_ORDER_DETAIL_PAGE.PROPS,
        meta: ROUTER_NAMES.PURHCASE_ORDER_DETAIL_PAGE.META,
      },
      {
        path: ROUTER_NAMES.PURCHASE_ORDERS_PAGE.URL,
        name: ROUTER_NAMES.PURCHASE_ORDERS_PAGE.NAME,
        component: PurchaseOrdersPage,
        props: ROUTER_NAMES.PURCHASE_ORDERS_PAGE.PROPS,
        meta: ROUTER_NAMES.PURCHASE_ORDERS_PAGE.META,
      },
      {
        path: ROUTER_NAMES.PURHCASE_PAGE.URL,
        name: ROUTER_NAMES.PURHCASE_PAGE.NAME,
        component: PurchasePage,
        props: ROUTER_NAMES.PURHCASE_PAGE.PROPS,
        meta: ROUTER_NAMES.PURHCASE_PAGE.META,
      },
      {
        path: ROUTER_NAMES.SALES_PAGE.URL,
        name: ROUTER_NAMES.SALES_PAGE.NAME,
        component: SalesPage,
        props: ROUTER_NAMES.SALES_PAGE.PROPS,
        meta: ROUTER_NAMES.SALES_PAGE.META,
      },
      {
        path: ROUTER_NAMES.SALES_ORDERS_PAGE.URL,
        name: ROUTER_NAMES.SALES_ORDERS_PAGE.NAME,
        component: SalesOrdersPage,
        props: ROUTER_NAMES.SALES_ORDERS_PAGE.PROPS,
        meta: ROUTER_NAMES.SALES_ORDERS_PAGE.META,
      },
      {
        path: ROUTER_NAMES.SALES_ORDER_DETAIL_PAGE.URL,
        name: ROUTER_NAMES.SALES_ORDER_DETAIL_PAGE.NAME,
        component: SalesOrderDetailPage,
        props: ROUTER_NAMES.SALES_ORDER_DETAIL_PAGE.PROPS,
        meta: ROUTER_NAMES.SALES_ORDER_DETAIL_PAGE.META,
      },
      {
        path: ROUTER_NAMES.CHECKLIST_PAGE.URL,
        name: ROUTER_NAMES.CHECKLIST_PAGE.NAME,
        component: CheckListPage,
        props: ROUTER_NAMES.CHECKLIST_PAGE.PROPS,
        meta: ROUTER_NAMES.CHECKLIST_PAGE.META,
      },
      {
        path: ROUTER_NAMES.CHECKLIST_DETAIL_PAGE.URL,
        name: ROUTER_NAMES.CHECKLIST_DETAIL_PAGE.NAME,
        component: CheckDetailPage,
        props: ROUTER_NAMES.CHECKLIST_DETAIL_PAGE.PROPS,
        meta: ROUTER_NAMES.CHECKLIST_DETAIL_PAGE.META,
      },
      {
        path: ROUTER_NAMES.CHECKLIST_ADD_PAGE.URL,
        name: ROUTER_NAMES.CHECKLIST_ADD_PAGE.NAME,
        component: CheckListAddPage,
        props: ROUTER_NAMES.CHECKLIST_ADD_PAGE.PROPS,
        meta: ROUTER_NAMES.CHECKLIST_ADD_PAGE.META,
      },
      {
        path: ROUTER_NAMES.TRADEIN_PAGE.URL,
        name: ROUTER_NAMES.TRADEIN_PAGE.NAME,
        component: TradeInPage,
        props: ROUTER_NAMES.TRADEIN_PAGE.PROPS,
        meta: ROUTER_NAMES.TRADEIN_PAGE.META,
      },
      {
        path: ROUTER_NAMES.TRADEIN_ORDERS_PAGE.URL,
        name: ROUTER_NAMES.TRADEIN_ORDERS_PAGE.NAME,
        component: TradeInOrdersPage,
        props: ROUTER_NAMES.TRADEIN_ORDERS_PAGE.PROPS,
        meta: ROUTER_NAMES.TRADEIN_ORDERS_PAGE.META,
      },
      {
        path: ROUTER_NAMES.TRADEIN_ORDER_DETAIL_PAGE.URL,
        name: ROUTER_NAMES.TRADEIN_ORDER_DETAIL_PAGE.NAME,
        component: TradeInOrderDetailPage,
        props: ROUTER_NAMES.TRADEIN_ORDER_DETAIL_PAGE.PROPS,
        meta: ROUTER_NAMES.TRADEIN_ORDER_DETAIL_PAGE.META,
      },
      {
        path: ROUTER_NAMES.ROLE_INDEX_PAGE.URL,
        name: ROUTER_NAMES.ROLE_INDEX_PAGE.NAME,
        component: RoleIndexPage,
        props: ROUTER_NAMES.ROLE_INDEX_PAGE.PROPS,
        meta: ROUTER_NAMES.ROLE_INDEX_PAGE.META,
      },
      {
        path: ROUTER_NAMES.USER_PAGE.URL,
        name: ROUTER_NAMES.USER_PAGE.NAME,
        component: UserIndexPage,
        props: ROUTER_NAMES.USER_PAGE.PROPS,
        meta: ROUTER_NAMES.USER_PAGE.META,
      },
      {
        path: ROUTER_NAMES.SETTING_INDEX_PAGE.URL,
        name: ROUTER_NAMES.SETTING_INDEX_PAGE.NAME,
        component: SettingsIndexPage,
        props: ROUTER_NAMES.SETTING_INDEX_PAGE.PROPS,
        meta: ROUTER_NAMES.SETTING_INDEX_PAGE.META,
      },
      {
        path: ROUTER_NAMES.INVENOTRY_PAGE.URL,
        name: ROUTER_NAMES.INVENOTRY_PAGE.NAME,
        component: InventoryPage,
        props: ROUTER_NAMES.INVENOTRY_PAGE.PROPS,
        meta: ROUTER_NAMES.INVENOTRY_PAGE.META,
      },
      {
        path: ROUTER_NAMES.INVENOTRY_DETAIL_PAGE.URL,
        name: ROUTER_NAMES.INVENOTRY_DETAIL_PAGE.NAME,
        component: InventoryDetailPage,
        props: ROUTER_NAMES.INVENOTRY_DETAIL_PAGE.PROPS,
        meta: ROUTER_NAMES.INVENOTRY_DETAIL_PAGE.META,
      },
      {
        path: ROUTER_NAMES.REPAIR_PAGE.URL,
        name: ROUTER_NAMES.REPAIR_PAGE.NAME,
        component: RepairPage,
        props: ROUTER_NAMES.REPAIR_PAGE.PROPS,
        meta: ROUTER_NAMES.REPAIR_PAGE.META,
      },
      {
        path: ROUTER_NAMES.REPAIR_ORDERS_PAGE.URL,
        name: ROUTER_NAMES.REPAIR_ORDERS_PAGE.NAME,
        component: RepairOrdersPage,
        props: ROUTER_NAMES.REPAIR_ORDERS_PAGE.PROPS,
        meta: ROUTER_NAMES.REPAIR_ORDERS_PAGE.META,
      },
      {
        path: ROUTER_NAMES.REPAIR_ORDER_DETAIL_PAGE.URL,
        name: ROUTER_NAMES.REPAIR_ORDER_DETAIL_PAGE.NAME,
        component: RepairOrderDetailPage,
        props: ROUTER_NAMES.REPAIR_ORDER_DETAIL_PAGE.PROPS,
        meta: ROUTER_NAMES.REPAIR_ORDER_DETAIL_PAGE.META,
      },
      {
        path: ROUTER_NAMES.CATEGORY_PAGE.URL,
        name: ROUTER_NAMES.CATEGORY_PAGE.NAME,
        component: CategoryPage,
        props: ROUTER_NAMES.CATEGORY_PAGE.PROPS,
        meta: ROUTER_NAMES.CATEGORY_PAGE.META,
      },
      {
        path: ROUTER_NAMES.BRANDS_PAGE.URL,
        name: ROUTER_NAMES.BRANDS_PAGE.NAME,
        component: BrandPage,
        props: ROUTER_NAMES.BRANDS_PAGE.PROPS,
        meta: ROUTER_NAMES.BRANDS_PAGE.META,
      },
      {
        path: ROUTER_NAMES.PRODUCT_ATTRIBUTE_PAGE.URL,
        name: ROUTER_NAMES.PRODUCT_ATTRIBUTE_PAGE.NAME,
        component: ProductAttributePage,
        props: ROUTER_NAMES.PRODUCT_ATTRIBUTE_PAGE.PROPS,
        meta: ROUTER_NAMES.PRODUCT_ATTRIBUTE_PAGE.META,
      },
      {
        path: ROUTER_NAMES.MENUS_PAGE.URL,
        name: ROUTER_NAMES.MENUS_PAGE.NAME,
        component: MenusPage,
        props: ROUTER_NAMES.MENUS_PAGE.PROPS,
        meta: ROUTER_NAMES.MENUS_PAGE.META,

      }
    ],
  },
  {
    path: ROUTER_NAMES.TRADEIN_RECEIPT_PAGE.URL,
    name: ROUTER_NAMES.TRADEIN_RECEIPT_PAGE.NAME,
    component: TradeInReceiptPage,
    props: ROUTER_NAMES.TRADEIN_RECEIPT_PAGE.PROPS,
    meta: ROUTER_NAMES.TRADEIN_RECEIPT_PAGE.META,
  },
  {
    path: ROUTER_NAMES.CHOOSE_BRANCH_PAGE.URL,
    name: ROUTER_NAMES.CHOOSE_BRANCH_PAGE.NAME,
    component: ChooseBranchPage,
    props: ROUTER_NAMES.CHOOSE_BRANCH_PAGE.PROPS,
    meta: ROUTER_NAMES.CHOOSE_BRANCH_PAGE.META,
  },
  {
    path: ROUTER_NAMES.NOT_FOUND_PAGE.URL,
    name: ROUTER_NAMES.NOT_FOUND_PAGE.NAME,
    component: NotFoundPage,
    props: ROUTER_NAMES.NOT_FOUND_PAGE.PROPS,
    meta: ROUTER_NAMES.NOT_FOUND_PAGE.META,
  },
  {
    path: ROUTER_NAMES.LOGIN_PAGE.URL,
    name: ROUTER_NAMES.LOGIN_PAGE.NAME,
    component: LoginPage,
    props: ROUTER_NAMES.LOGIN_PAGE.PROPS,
    meta: ROUTER_NAMES.LOGIN_PAGE.META,
  },
];

export default routes;
